<?php
    include_once 'fun.php';
    include_once 'islogin.php';
    $_SESSION['isadmin']=isset($_SESSION['isadmin'])?$_SESSION['isadmin']:'';
    if ($_SESSION['isadmin']!=3&&$_SESSION['isadmin']!=-1) {
        header('Refresh:1;url=shop.php');
        die("请以人力管理员身份登录");
    }
    $con=connect();
    $id=$_GET['id'];
    $sql = "delete from user where id = (select id from stuff where stuffid={$id})";
    query($sql,$con);
    $sql = "delete from stuff where stuffid = {$id}";
   
    query($sql,$con);
    
    echo "<script>
			
			location.href='stuff.php';
	</script>";
?>